package exemplo.controller;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by IntelliJ IDEA.
 * User: lasombra
 * Date: 2009/09/30
 * Time: 4:35:33 PM
 */

@Controller
public class HelloController
{
	private Logger log = Logger.getLogger( getClass() );

	@RequestMapping ( method = RequestMethod.GET )
	public String index( Model model )
	{
		String mensagem = "Mensagem do Spring 3 MVC!";
		log.info( "Estou em HelloController/index" );
		model.addAttribute( "mensagem", mensagem );
		return "hello/index";
	}
}
